import request from '@/config/axios'

// 专业字典 VO
export interface BasedataVO {
  id: number // 字典id
  dataName: string // 专业名称
  remark: string // 备注
}

// 专业字典 API
export const BasedataApi = {
  // 查询专业字典分页
  getBasedataPage: async (params: any) => {
    return await request.get({ url: `/expert/basedata/page`, params })
  },

  // 查询专业字典详情
  getBasedata: async (id: number) => {
    return await request.get({ url: `/expert/basedata/get?id=` + id })
  },

  // 新增专业字典
  createBasedata: async (data: BasedataVO) => {
    return await request.post({ url: `/expert/basedata/create`, data })
  },

  // 修改专业字典
  updateBasedata: async (data: BasedataVO) => {
    return await request.put({ url: `/expert/basedata/update`, data })
  },

  // 删除专业字典
  deleteBasedata: async (id: number) => {
    return await request.delete({ url: `/expert/basedata/delete?id=` + id })
  },

  // 导出专业字典 Excel
  exportBasedata: async (params) => {
    return await request.download({ url: `/expert/basedata/export-excel`, params })
  },

   // 查询专业字典 Excel
   getMajorList: async () => {
    return await request.get({ url: `/expert/basedata/getMajorList` })
  },
}
